Open
Bug 1240454
Opened 9 years ago
Updated 3 years ago
Remove array comprehensions from toolkit
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
NEW
People
(Reporter: bmanojkumar24, Unassigned)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20151016093648
Expected results:
Array comprehensions are non-standard, we should stop using them and replace existing usage with .map, .from, .filter or other array methods, depending on the code.
Updated•9 years ago
|
Assignee: nobody → bmanojkumar24
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/31191/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31191/
Reporter | ||
Updated•9 years ago
|
Attachment #8708961 -
Flags: review?(dtownsend)
Comment 2•9 years ago
|
||
Comment on attachment 8708961 [details]
MozReview Request: Bug 1240454 - Remove array comprehensions from toolkit
https://reviewboard.mozilla.org/r/31191/#review28167
::: toolkit/components/passwordmgr/LoginManagerContent.jsm:1359
(Diff revision 1)
> - let classText = [for (className of aElement.classList) "." + className].join("");
> + let classText = aElement.classList.map(className => "." + className).join("");
classList is a DOMTokenList not an array and so doesn't have a map function.
Attachment #8708961 -
Flags: review?(dtownsend)
Reporter | ||
Comment 3•9 years ago
|
||
Comment on attachment 8708961 [details]
MozReview Request: Bug 1240454 - Remove array comprehensions from toolkit
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31191/diff/1-2/
Attachment #8708961 -
Attachment description: MozReview Request: Bug 1240454 - Remove array comprehensions from toolkit .r=:mossop → MozReview Request: Bug 1240454 - Remove array comprehensions from toolkit
Attachment #8708961 -
Flags: review?(dtownsend)
Updated•9 years ago
|
Attachment #8708961 -
Flags: review?(dtownsend) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8708961 [details]
MozReview Request: Bug 1240454 - Remove array comprehensions from toolkit
https://reviewboard.mozilla.org/r/31191/#review28339
::: toolkit/components/passwordmgr/LoginManagerContent.jsm:1372
(Diff revision 2)
> - cleansedValue = [for (element of value) prettyElementOutput(element)];
> + cleansedValue = value.map(element => prettyElementOutput(element));
You can just use value.map(prettyElementOutput) here.
Reporter | ||
Comment 5•9 years ago
|
||
Comment on attachment 8708961 [details]
MozReview Request: Bug 1240454 - Remove array comprehensions from toolkit
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31191/diff/2-3/
Comment 6•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: bmanojkumar24 → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•